var log = taurus.client.log;
var tc = taurus.client;
var Startup = (function () {
    function Startup() {
    }
    Startup.web_test = function () {
        var client = new tc.TaurusClient("http://127.0.0.1/", "test", tc.ConnectionProtocol.Web);
        client.connect();
        client.send("test", tc.TObject.newInstance(), function (t) {
            log.info(t.returnCode);
        }, this);
    };
    Startup.main = function () {
        log.info("fdgfd{0},{1}，{2}", 233, "555", "dddd");
        var t = new tc.TaurusClient("127.0.0.1:8080", "test", tc.ConnectionProtocol.WebSocket);
        t.connect();
        t.addEventListener(tc.NetClientEvent.Connect, function (evt) {
            var code = evt.getParameter("code");
            log.info("code:{0} ddd:{1}", code, tc.SocketCode.Connect);
            if (code == tc.SocketCode.Connect) {
                var _data = tc.TObject.newInstance();
                _data.putInt("pram", 111);
                t.send("t1/test", _data, function (response) {
                    log.info("t1 response.returnCode:{0}", response.returnCode);
                    if (response.returnCode == 0) {
                    }
                }, this);
            }
            else {
                log.info("连接失败");
                t.killConnection();
            }
        }, this);
        return 0;
    };
    return Startup;
}());
Startup.main();
